<?php
header("Content-Type:text/html;charset=UTF-8");
require_once '../global.php';
function king_def(){
	global $king;


		$cachepath="log/chanshu";
		if(!$karray=$king->cache->get($cachepath)){
		
				$i=$king->db->getRows_one("select kcontent from %s_block where kname='日志路径'");	
				$karray['logdata']=$king->db->getRows("select kmark,kname from %s_bot");		
				$karray['url']=explode('|',$i['kcontent']);
				$king->cache->put($cachepath,$karray);
		}		
		$nadte=$karray['url']['1'].'_'.date('Ymd',strtotime(date("Y-m-d H:i:s")) - 1*24*60*60);
		
$da=$karray['url']['0'].'/'.date('Y/m',strtotime(date("Y-m-d H:i:s")) - 1*24*60*60).'/';
		$thred=$king->db->getRows_one("select ktitle from %s_log_list where ktitle='".$nadte."'");
		
		if(empty($thred)){
	
			log_class::kui_add($da,$nadte);	
			echo $da;
			echo $nadte;
			$ay['ktitle']=$nadte;
			$ay['ndate']=date('Ymd',strtotime(date("Y-m-d H:i:s")) - 1*24*60*60);
			$king->db->insert('%s_log_list',$ay);
		}

		log_class::gegx_ip(date("Y-m-d H:i:s"));

}









?>